class WsBean {
  static String chatList = "chat_list";
  static String chat= "chat";
  static String chatOpen = "chat_open";
  static String chatRead = "chat_read";
  static String chatMore = "chat_more";
  static String chatUsers = "chat_users";


  String mold;
  int id;
  int valueMold;
  String value;

  Map<String,dynamic> toJson()=>jsonFromBeanWsBean(this);
  WsBean(Map<String,dynamic> json){
    jsonToBeanWsBean(json,this);
  }
}

void jsonToBeanWsBean(Map<String,dynamic> json,WsBean bean){
  if(json==null) return;
  bean.mold=json["mold"]?.toString()??"";
  bean.id=int.parse(json["id"]?.toString()??"0");
  bean.valueMold=int.parse(json["value_mold"]?.toString()??"0");
  bean.value=json["value"]?.toString()??"";

}

Map<String,dynamic> jsonFromBeanWsBean(WsBean bean)=>{
  "mold":bean.mold,
  "id":bean.id,
  "value_mold":bean.valueMold,
  "value":bean.value,
};
